import { http } from '@/http';

interface LogListParams {
  page: number;
  limit: number;
}

interface LogListResponse {
  total_profit: number;
  allow_profit: number;
  doing_profit: number;
  finished_profit: number;
  total_count: number;
  total_page: number;
  list: any[];
}

export default {
  // 提現
  withdraw: ({ data = null, config = {} } = {}) => {
    return http('post', '/union/withdraw/withdrawCreate', data, config);
  },

  // 提現紀錄
  logList: (logListParams: LogListParams) => {
    return http<LogListResponse>(
      'post',
      '/union/withdraw/withdrawLoglist',
      logListParams
    );
  },
};
